<li id="req_<%= req.id %>" class="req">
<% nb = req.subreqs.size %>

<%= link_to_remote(image_tag('edit.gif'), :url=>{:action=>'edit_form', :id=>req.id}, :update=>'req_'+req.id.to_s, :loading=>"$('loading').show()", :complete=>"$('loading').hide()" ) %>
<%= check_box_tag('id[]',req.id) %>


<% if(nb > 0) -%>
  <%= link_to_remote(image_tag('expand.gif'), :url => {:action=>'expand_req',:id=>req.id}, :update=>'subreq_'+req.id.to_s, :loading=>"$('loading').show()", :complete=>"$('loading').hide()") %>
<% else -%>
  <div style="padding-left:16px;display:inline"></div>
<% end -%>

[<%= req.version %>]
P<%= req.priority %>
<div class="category"><%= req.category %></div>
<div class="reference"><%= req.reference %></div>
<div class="text"><%= req.text %></div>
<%= link_to_remote(image_tag('add.png'), :url=>{:action=>'add_form', :father_id=>req.id}, :update=>'subreq_'+req.id.to_s, :position=>:after ) %>
<div class="status <%= RequirementsHelper.id_to_style(req.status) %>"><%= RequirementsHelper.id_to_status(req.status) %></div>
</li>
<ol id="subreq_<%= req.id %>"></ol>

